<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="Cache-Control" content="No-Cache">
	<meta http-equiv="Pragma" content="No-Cache">

	<title>운세의 신</title>

	<link rel="stylesheet" type="text/css" href="/css/common.css">

	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
	<script src="/js/common_basic.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			$("#frm").submit(function() {
				if (!confirm("한번 업그레이드를 실행하면 되돌릴 수 없습니다.\n계속 진행하시겠습니까?")) {
					return false;
				}
			});
		});
	</script>
</head>
<body>
<div id="wrap">
	<!-- Contents -->
	<div>
		<h2>VIP상품 상태</h2>
		<div>
			<form method="post" id="frm" action="/member/member/change_package_ok">
				<fieldset>
					<table width="100%" border="1" cellpadding="2" cellspacing="0">
						<tr>
							<td>사용자ID</td>
							<td colspan="3"><input type="text" name="user_id" value="<?=$member_package['user_id']?>" readonly="readonly" /></td>
						</tr>
						<tr>
							<td>현재이용권</td>
							<td><input type="text" name="package_name" value="<?=$member_package['package_name']?>" readonly="readonly" /></td>
							<td>일련번호</td>
							<td><input type="text" name="idx" value="<?=$member_package['idx']?>" readonly="readonly" /></td>
						</tr>
					</table>
					<br />
					<table width="100%" border="1" cellpadding="2" cellspacing="0">
						<tr>
							<td>종류</td>
							<td>잔여이용권</td>
							<td>사용이용권</td>
						</tr>
<?
	for ($i=0; $i < count($member_package['coupon_list']) ; $i++) { 
		$item = $member_package['coupon_list'][$i];
?>
						<tr>
							<td><input type="hidden" name="service_group_id[]" value="<?=$item['service_group_id'];?>" /><?=$item['service_group_name'];?> 이용권</td>
							<td><?=$item['qty']?>장</td>
							<td><input type="text" name="qty[]" size="5" maxlength="5" value="<?=$item['coupon_qty']-$item['qty']?>" readonly="readonly" />장</td>
						</tr>
<?	} ?>
					</table>
<?	if ($member_package['package_cd'] == '4') : ?>
					<br />
					<h2>VIP상품 업그레이드</h2>
					<input type="submit" value="골드로 업그레이드" /> 	<span style="color: red">※ 사용 횟수만큼 차감 후 업그레이드 됩니다.</span>
<? endif ?>
				</fieldset>
			</form>
		</div>
		<div>
			<input type="button" value="닫기" onclick="window.close();" />
		</div>
	</div>
	<!--// Contents -->
</div>
</body>
</html>